<template>
	<view>
		<view class="header">
			<text @click="back" class="iconfont icon-xiangzuojiantou">支付成功</text>
		</view>
		<view class="content">
			<text class="iconfont icon-duihao"></text>
			<view>支付成功</view>
		</view>
		<view class="btn">
			<button type="warn" @click="chakan">查看订单</button>
			<button type="warn" @click="fanhui">返回首页</button>
		</view>
	</view>
</template>

<script>
	import {reactive,toRefs} from 'vue';
	import {useStore} from 'vuex'
	export default {
		setup(){
			const {state,getters,commit,dispatch} = useStore();
			let data=reactive({
				// back(){
				// 	console.log('上页！')
				// 	uni.switchTab()({
				// 		url: '/pages/querendingdan/querendingdan'
				// 	});
				// },
				chakan(){
					// console.log(123)
					if(state.shopcart.whichdd=='yp'){
						uni.navigateTo({
							url: '/pages/myorder/order?iskind=待发货'
						})
					}else{
						uni.navigateTo({
							url: '/pages/ptdaizhifu/ptdaizhifu'
						});
					}
					
				},
				fanhui(){
					uni.redirectTo({
						url: '/pages/index/index'
					});
				}
			})
			return {...toRefs(data)}
		},
		data() {
			return {
				
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="less">
	@import url("~@/static/fonts/iconfont.css");
	.header{
		padding: 20rpx 30rpx;
		box-sizing: border-box;
		border-bottom: 1rpx solid #efefef;
		display: flex;
		justify-content: space-between;
		>text:nth-child(2){
			color: red;
		}
	}
	.content{
		margin-top: 50rpx;
		text-align: center;
		text{
			color: #DA2222;
			font-size: 200rpx;
		}
		view{
			margin-top: 20rpx;
			font-weight: 600;
		}
	}
	.btn{
		display: flex;
		justify-content: space-around;
		align-items: center;
		padding: 0 80rpx;
		margin-top: 100rpx;
		button{
			// width: 370rpx;
			font-size: 16px;
		}
	}
</style>
